# Maintainer: Florian Pritz <bluewind@xinu.at>

pkgname=perl-object-accessor
pkgver=0.48
pkgrel=9
pkgdesc='Per object accessors'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl)
url=https://metacpan.org/release/Object-Accessor
source=("https://search.cpan.org/CPAN/authors/id/B/BI/BINGOS/Object-Accessor-$pkgver.tar.gz")
md5sums=(46a3ce50d8817938cecbb8e02eda9500)
sha512sums=(fbce10e8db2cfb360cdc093355a95c9d49909069beb725fca9812ee6e6b77e0648d63d56db9fbdcdf03f885b3954a67c516fa066229280279940704231d48448)
_ddir="Object-Accessor-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
